const express = require('express');
const { home, login, register, sendEmail, addComment, delComment, ArticleList, editArticle, delArticle, ArticleDetails, addArticle, myArticleList } = require('../model/index')
const router = express.Router();
/* GET home page. */
router.get('/', function (req, res, next) {
  home(req, res, next)
});
router.post('/login', function (req, res, next) {
  login(req, res, next)
});
router.post('/register', function (req, res, next) {
  register(req, res, next)
});
router.post('/sendEmail', function (req, res, next) {
  sendEmail(req, res, next)
});
router.get('/ArticleList', function (req, res, next) {
  ArticleList(req, res, next)
});
router.get('/ArticleDetails', function (req, res, next) {
  ArticleDetails(req, res, next)
});
router.post('/addArticle', function (req, res, next) {
  addArticle(req, res, next)
});
router.get('/myArticleList', function (req, res, next) {
  myArticleList(req, res, next)
});
router.post('/editArticle', function (req, res, next) {
  editArticle(req, res, next)
});
router.get('/delArticle', function (req, res, next) {
  delArticle(req, res, next)
});
router.post('/addComment', function (req, res, next) {
  addComment(req, res, next)
});
router.get('/delComment', function (req, res, next) {
  delComment(req, res, next)
});
module.exports = router;
